import { configureStore } from '@reduxjs/toolkit'
import { tokenSlice } from './module/token'
import { baseMapSlice } from './module/baseMap'
import { useridSlice } from './module/userid'
import { onlineSlice } from './module/online'

const store = configureStore({
  reducer: {
    token: tokenSlice.reducer,
    baseMap: baseMapSlice.reducer,
    userid: useridSlice.reducer,
    online: onlineSlice.reducer,
  },
  // 这里地reducer 和模块里面的reducers不是同一个！！！！
  middleware: getDefaultMiddleware =>
    getDefaultMiddleware({
      /* 关闭序列化检查 */
      serializableCheck: false,
    }),
})
export default store
